//
//  NSFileManager+extension.m
//  lcf-newproject
//
//  Created by yangyang on 14-11-19.
//  Copyright (c) 2014年 yang. All rights reserved.
//

#import "NSFileManager+extension.h"

@implementation NSFileManager (extension)


@end


@implementation NSFileManager (pathManager)

+(BOOL)isTimeOutWithPath:(NSString * )path time:(NSTimeInterval)time{
    //获取指定路径文件的属性
    NSDictionary * dic = [[NSFileManager defaultManager]attributesOfItemAtPath:path error:nil];
    //获取文件的创建时间
    NSDate * createDate = [dic objectForKey:NSFileCreationDate];
    //获取系统的时间
    NSDate * date = [NSDate date];
    
    NSTimeInterval timeInterval = [date timeIntervalSinceDate:createDate];
    if (timeInterval < time) {
        //没有超时
        return NO;
    }
    else{
        //超时
        return YES;
    }
}


@end